configure.ac Makefile.am docs/Makefile.am check for inkscape and w3m which
authorSven Neumann <sven@gimp.org>
Fri, 26 Aug 2005 22:07:06 +0000 (22:07 +0000)
committerSven Neumann <neo@src.gnome.org>
Fri, 26 Aug 2005 22:07:06 +0000 (22:07 +0000)
2005-08-27  Sven Neumann  <sven@gimp.org>

* configure.ac
* Makefile.am
* docs/Makefile.am
* docs/graphics/Makefile.am: check for inkscape and w3m which are
needed to build the documentation. Compile without them but bail
out on 'make dist'.

ChangeLog
Makefile.am
configure.ac
docs/Makefile.am
docs/graphics/Makefile.am
tests/.cvsignore

index aee8929fd33915b505f1e9f7bcede8546d3b864a..557ee6e467cc8adeed7e3030bed0308a0178b91b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-08-27  Sven Neumann  <sven@gimp.org>
+
+       * configure.ac
+       * Makefile.am
+       * docs/Makefile.am
+       * docs/graphics/Makefile.am: check for inkscape and w3m which are
+       needed to build the documentation. Compile without them but bail
+       out on 'make dist'.
+
 2005-08-26  Øyvind Kolås  <pippin@gimp.org>
 
        * tests/rgb_to_bgr.c: added component shuffling test
index 5bbf5291c9113dc293f8e94e96989573b60ebe8d..b877b1ca1890f92f7fdc46140fe09da89635a471 100644 (file)
@@ -4,31 +4,39 @@ SUBDIRS = babl        \
          tests \
          docs
 
-
-DIST_SUBDIRS = babl    \
-              tests    \
-              docs
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = babl.pc
 
-EXTRA_DIST =           \
-       .cvsignore      \
+built_dist_files =     \
+       README          \
+       babl.pc
+
+EXTRA_DIST = $(built_dist_files) \
+       AUTHORS         \
        COPYING         \
-       ChangeLog       \
-       INSTALL.in      \
+       INSTALL         \
        NEWS            \
-       babl.pc.in      \
-       autogen.sh
+       ChangeLog       \
+       autogen.sh      \
+       babl.pc.in
+
+DISTCLEANFILES = $(built_dist_files)
 
-BUILT_EXTRA_DIST =     \
-       README          \
-       babl.pc
 
 .PHONY: snapshot
 
-README:
-       echo "Eek!" > $@
+
+if HAVE_W3M
+dist-check-w3m:
+
+README: docs/index.html
+       $(W3M) -cols 72 -dump $< > $@
+else
+dist-check-w3m:
+       @echo "*** w3m must be available in order to make dist"
+       @false
+endif
+
 
 snapshot:
        $(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"`
@@ -39,3 +47,5 @@ distclean-local:
        if test $(srcdir) = .; then :; else     \
                rm -f $(BUILT_EXTRA_DIST);      \
        fi
+
+dist-hook: dist-check-w3m
index c89a35299d72eae6e8849301198195633ee9213f..fc3babf656c9d019bd32fd9bde6d74cd7c68785d 100644 (file)
@@ -35,6 +35,12 @@ if eval "test x$GCC = xyes"; then
   esac
 fi
 
+AC_PATH_PROG(INKSCAPE, inkscape, no)
+AM_CONDITIONAL(HAVE_INKSCAPE, test "x$INKSCAPE" != "xno")
+
+AC_PATH_PROG(W3M, w3m, no)
+AM_CONDITIONAL(HAVE_W3M, test "x$W3M" != "xno")
+
 dnl ===========================================================================
 
 AC_CONFIG_FILES(
index 0d2d7ac03646fee24c7ad0303e448533a28b7c4a..2d946f13286bc16f6abad7335a5859294d925710 100644 (file)
@@ -25,7 +25,7 @@ MAINTAINERCLEANFILES = index.html
 
 all: $(HTML_FILES)
 
-index.html: index-static.html $(top_builddir)/tests/babl_html_dump ../AUTHORS ../NEWS
+index.html: index-static.html $(top_builddir)/tests/babl_html_dump $(top_srcdir)/AUTHORS  $(top_srcdir)/NEWS
        cp $< $@ 
        (TMPFILE=`tempfile`;\
        $(top_builddir)/tests/babl_html_dump > $$TMPFILE;\
@@ -34,8 +34,6 @@ index.html: index-static.html $(top_builddir)/tests/babl_html_dump ../AUTHORS ..
 
        $(top_srcdir)/docs/tools/xml_insert.sh $@ AUTHORS $(top_srcdir)/AUTHORS
        $(top_srcdir)/docs/tools/xml_insert.sh $@ NEWS $(top_srcdir)/NEWS
-       
-       w3m -cols 72 -dump $@ > ../README
 
 distclean-local:
        if test $(srcdir) = .; then :; else     \
index 615eee9ff36e6a77ce598a67985feffc32fd0abe..57b6403bc0297e90cf241bbab8cabe1285dcfd4e 100644 (file)
@@ -1,7 +1,9 @@
+if HAVE_INKSCAPE
 PNG_FILES =                    \
        babl-a4poster.png       \
        babl-16x16.png          \
        babl-48x48.png
+endif
 
 SVG_FILES =                    \
        babl-a4poster.svg       \
@@ -18,12 +20,23 @@ MAINTAINERCLEANFILES = $(PNG_FILES)
 
 all: $(MAINTAINERCLEANFILES)
 
-%.png : %.svg
-       inkscape -e $@ $<
+
+if HAVE_INKSCAPE
+dist-check-inkscape:
+
+%.png: %.svg
+       $(INSCAPE) -e $@ $<
 
 # the png version of the a4 poster is used as a webgraphic
 # , thus it is rendered with the background alpha set to
 # 0.0
 babl-a4poster.png: babl-a4poster.svg
-       inkscape -e $@ $< -w 256 -y 0
+       $(INSCAPE) -e $@ $< -w 256 -y 0
+else
+dist-check-inkscape:
+       @echo "*** inkscape must be available in order to make dist"
+       @false
+endif
+
 
+dist-hook: dist-check-inkscape
index 3842de2ba7d743689a12c91dac67f980a9fa6a4b..728f45d6e1f689c64a0eacbdcbb3b57637d11b38 100644 (file)
@@ -6,6 +6,7 @@ float_to_u8
 grayscale_to_rgb
 introspect
 nop
+rgb_to_bgr
 rgb_to_lab_to_rgb
 rgb_to_ycbcr
 rgb_to_ycbcr_to_rgb